/**
 * @author GuoXinyuan
 * @date 2021/10/17
 */
public class Main {

    public static void main(String[] args) {
        String s =
              "This is but a first step in understanding the interaction environment provided by wall-size displays. Our next goal is\n" +
                      "to extend this research to collaborative work, where multiple\n" +
                      "users perform the classification task in various settings, e.g.\n" +
                      "a shared wall-size display vs. several desktop workstations\n" +
                      "working on a shared scene. A deeper understanding of spatial memory and of the respective advantages of physical and\n" +
                      "virtual navigation should also inform the design of new techniques for the wall and desktop environments that improve\n" +
                      "user performance and reduce fatigue and cognitive load.\n"

                ;

        StringBuilder stringBuilder = new StringBuilder(" ");

        for (int i = 0;i<s.length();i++) {
            char ch = s.charAt(i);

            if(ch == '\n') stringBuilder.append(' ');
            else if(ch == '.') stringBuilder.append(".\n");
            else stringBuilder.append(ch);
        }

        System.out.println(stringBuilder.toString());
    }

}
